#pragma once
#include <list>
#include "DXG.h"

class DXViewEntity
{
public:
	static std::list<DXViewEntity*> s_EntityList;
	static void DrawAllEntity(LPDIRECT3DDEVICE9 pd3ddev9)
	{
		std::list<DXViewEntity*>::iterator iter = s_EntityList.begin();
		for (; iter != s_EntityList.end(); iter++)
		{
			(*iter)->Draw(pd3ddev9);
		}
	}

protected:
	bool m_bEnable;
	void Regist() { s_EntityList.push_back(this); }
	D3DXMATRIX m_world;

public:

	DXViewEntity(void)
	{
		D3DXMatrixIdentity(&m_world);
	}

	virtual ~DXViewEntity(void)
	{
	}

	virtual HRESULT Draw(LPDIRECT3DDEVICE9 pd3ddev9) = 0;
};
